import { StyleSheet, View, ScrollView } from 'react-native';
import React from 'react';
import { useRoute } from '@react-navigation/native';
import { useTranslation } from 'react-i18next';
import FastImage from '@d11/react-native-fast-image';
import { NavBarHeader } from '~/components';

export default function CourseDetailes() {
    const router: any = useRoute();
    const { base_course_img } = router.params || {};
    const { t } = useTranslation();
    // 显示大包的疗程详情
    return (
        <View style={styles.container}>
            <NavBarHeader title={t('CourseDetailes.title')} />
            <ScrollView contentContainerStyle={styles.contentContainerStyle} showsVerticalScrollIndicator={false}>
                <FastImage
                    style={styles.bg}
                    source={{
                        uri: base_course_img,
                        priority: FastImage.priority.high,
                    }}
                    resizeMode={FastImage.resizeMode.stretch}
                />
            </ScrollView>
        </View>
    );
}

const styles = StyleSheet.create({
    contentContainerStyle: {
        flexGrow: 1,
    },
    container: {
        flex: 1,
        backgroundColor: '#fff',
    },
    bg: {
        width: '100%',
        height: '100%',
    },
});
